package com.wondertek.poms.service.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wondertek.poms.common.utils.validate.GroupType;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.groups.Default;
import java.util.Date;

@Data
public class PrdContChargeVo {

    private Long id;

    @NotBlank(message = "节目id不能为空", groups = {Default.class})
    @Length(message = "节目id长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String prdContId;

    @Length(message = "节目名称长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String prdContName;

    @Length(message = "商品包id长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String prdInfoId;

    @Length(message = "产品属性长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String productProp;

    @Length(message = "计费id长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String chargeId;

    @Length(message = "计费名称长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String chargeName;

    @Length(message = "计费类型长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String chargeType;

    @Length(message = "下载次数长度不能超过10个字节", max=10, groups = {Default.class, GroupType.Update.class})
    private int downCount;

    @Length(message = "渠道包id长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String channalPkgId;

    @Length(message = "码率类型长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String mediaRate;

    @Length(message = "码率计费id长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String rateChargeId;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @Length(message = "状态长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String status;

    private String creator;

    @Length(message = "终端长度不能超过255个字节", max=255, groups = {Default.class, GroupType.Update.class})
    private String terminalSystem;
}
